package com.rzl.expense.expense.service.impl;

import java.util.List;
import com.rzl.expense.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzl.expense.expense.mapper.EleBillaccountbaseresourceMapper;
import com.rzl.expense.expense.domain.EleBillaccountbaseresource;
import com.rzl.expense.expense.service.IEleBillaccountbaseresourceService;

/**
 * 报账点资源关联Service业务层处理
 * 
 * @author expense
 * @date 2024-11-22
 */
@Service
public class EleBillaccountbaseresourceServiceImpl implements IEleBillaccountbaseresourceService 
{
    @Autowired
    private EleBillaccountbaseresourceMapper eleBillaccountbaseresourceMapper;

    /**
     * 查询报账点资源关联
     * 
     * @param billaccountbaseresourceId 报账点资源关联主键
     * @return 报账点资源关联
     */
    @Override
    public EleBillaccountbaseresource selectEleBillaccountbaseresourceByBillaccountbaseresourceId(String billaccountbaseresourceId)
    {
        return eleBillaccountbaseresourceMapper.selectEleBillaccountbaseresourceByBillaccountbaseresourceId(billaccountbaseresourceId);
    }

    /**
     * 查询报账点资源关联列表
     * 
     * @param eleBillaccountbaseresource 报账点资源关联
     * @return 报账点资源关联
     */
    @Override
    public List<EleBillaccountbaseresource> selectEleBillaccountbaseresourceList(EleBillaccountbaseresource eleBillaccountbaseresource)
    {
        return eleBillaccountbaseresourceMapper.selectEleBillaccountbaseresourceList(eleBillaccountbaseresource);
    }

    /**
     * 新增报账点资源关联
     * 
     * @param eleBillaccountbaseresource 报账点资源关联
     * @return 结果
     */
    @Override
    public int insertEleBillaccountbaseresource(EleBillaccountbaseresource eleBillaccountbaseresource)
    {
        eleBillaccountbaseresource.setCreateTime(DateUtils.getNowDate());
        return eleBillaccountbaseresourceMapper.insertEleBillaccountbaseresource(eleBillaccountbaseresource);
    }

    /**
     * 修改报账点资源关联
     * 
     * @param eleBillaccountbaseresource 报账点资源关联
     * @return 结果
     */
    @Override
    public int updateEleBillaccountbaseresource(EleBillaccountbaseresource eleBillaccountbaseresource)
    {
        eleBillaccountbaseresource.setUpdateTime(DateUtils.getNowDate());
        return eleBillaccountbaseresourceMapper.updateEleBillaccountbaseresource(eleBillaccountbaseresource);
    }

    /**
     * 批量删除报账点资源关联
     * 
     * @param billaccountbaseresourceIds 需要删除的报账点资源关联主键
     * @return 结果
     */
    @Override
    public int deleteEleBillaccountbaseresourceByBillaccountbaseresourceIds(String[] billaccountbaseresourceIds)
    {
        return eleBillaccountbaseresourceMapper.deleteEleBillaccountbaseresourceByBillaccountbaseresourceIds(billaccountbaseresourceIds);
    }

    /**
     * 删除报账点资源关联信息
     * 
     * @param billaccountbaseresourceId 报账点资源关联主键
     * @return 结果
     */
    @Override
    public int deleteEleBillaccountbaseresource(String[] currentDate)
    {
        return eleBillaccountbaseresourceMapper.deleteEleBillaccountbaseresource(currentDate[0],currentDate[1]);
    }




    @Override
    public void batchEleBillaccountbaseresource(List<EleBillaccountbaseresource> list)
    {

         eleBillaccountbaseresourceMapper.batchEleBillaccountbaseresource(list);
    }


}
